//
//  Stage.m
//  HardestGame
//
//  Created by apple on 13-8-16.
//  Copyright (c) 2013年 itcast. All rights reserved.
//

#import "StageModel.h"

#define kIcon @"icon"
#define kMax @"max"
#define kMin @"min"
#define kTitle @"title"
#define kIntro @"intro"
#define kFormat @"format"
#define kUnit @"unit"

@implementation StageModel
+ (StageModel *)stageWithDict:(NSDictionary *)dict {
    StageModel *stage = [[self alloc] init];
    stage.icon = dict[kIcon];
    stage.max = [dict[kMax] doubleValue];
    stage.min = [dict[kMin] doubleValue];
    stage.title = dict[kTitle];
    stage.intro = dict[kIntro];
    stage.format = dict[kFormat];
    stage.unit = dict[kUnit];
    return stage;
}
@end

